using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.ComponentModel;

namespace BlogClient.Editor
{
    class EditorPanel : Panel
    {
        IEditor _editor;

        public EditorPanel()
        {
        }

        public void SetEditor(IEditor editor)
        {
            _editor = editor;
            _editor.Load(this);
        }

        [SettingsBindable(true)]
        public string Html
        {
            get
            {
                return _editor == null ? "" : _editor.Html;
            }
            set
            {
                if (_editor != null) { _editor.Html = value; }
            }
        }
    }
}
